// Copyright (c) 2016, SolidCP
// SolidCP is distributed under the Creative Commons Share-alike license
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must  retain  the  above copyright notice, this
//   list of conditions and the following disclaimer.
//
// - Redistributions in binary form  must  reproduce the  above  copyright  notice,
//   this list of conditions  and  the  following  disclaimer in  the documentation
//   and/or other materials provided with the distribution.
//
// - Neither  the  name  of  SfB  nor   the   names  of  its
//   contributors may be used to endorse or  promote  products  derived  from  this
//   software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,  BUT  NOT  LIMITED TO, THE IMPLIED
// WARRANTIES  OF  MERCHANTABILITY   AND  FITNESS  FOR  A  PARTICULAR  PURPOSE  ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL,  SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO,  PROCUREMENT  OF  SUBSTITUTE  GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)  HOWEVER  CAUSED AND ON
// ANY  THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT  LIABILITY,  OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING  IN  ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.6400
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
// 
namespace SolidCP.EnterpriseServer {
    using System.Xml.Serialization;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Diagnostics;

    using SolidCP.Providers.Common;
    using SolidCP.Providers.HostedSolution;
    using SolidCP.Providers.ResultObjects;

    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="esSfBSoap", Namespace="http://tempuri.org/")]
    public partial class esSfB : Microsoft.Web.Services3.WebServicesClientProtocol {
        
        private System.Threading.SendOrPostCallback CreateSfBUserOperationCompleted;
        
        private System.Threading.SendOrPostCallback DeleteSfBUserOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetSfBUsersPagedOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetSfBUsersByPlanIdOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetSfBUserCountOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetSfBUserPlansOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetSfBUserPlanOperationCompleted;
        
        private System.Threading.SendOrPostCallback AddSfBUserPlanOperationCompleted;
        
        private System.Threading.SendOrPostCallback UpdateSfBUserPlanOperationCompleted;
        
        private System.Threading.SendOrPostCallback DeleteSfBUserPlanOperationCompleted;
        
        private System.Threading.SendOrPostCallback SetOrganizationDefaultSfBUserPlanOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetSfBUserGeneralSettingsOperationCompleted;
        
        private System.Threading.SendOrPostCallback SetSfBUserGeneralSettingsOperationCompleted;
        
        private System.Threading.SendOrPostCallback SetUserSfBPlanOperationCompleted;
        
        private System.Threading.SendOrPostCallback GetFederationDomainsOperationCompleted;
        
        private System.Threading.SendOrPostCallback AddFederationDomainOperationCompleted;
        
        private System.Threading.SendOrPostCallback RemoveFederationDomainOperationCompleted;
        
        /// <remarks/>
        public esSfB() {
            this.Url = "http://127.0.0.1:9002/esSfB.asmx";
        }
        
        /// <remarks/>
        public event CreateSfBUserCompletedEventHandler CreateSfBUserCompleted;
        
        /// <remarks/>
        public event DeleteSfBUserCompletedEventHandler DeleteSfBUserCompleted;
        
        /// <remarks/>
        public event GetSfBUsersPagedCompletedEventHandler GetSfBUsersPagedCompleted;
        
        /// <remarks/>
        public event GetSfBUsersByPlanIdCompletedEventHandler GetSfBUsersByPlanIdCompleted;
        
        /// <remarks/>
        public event GetSfBUserCountCompletedEventHandler GetSfBUserCountCompleted;
        
        /// <remarks/>
        public event GetSfBUserPlansCompletedEventHandler GetSfBUserPlansCompleted;
        
        /// <remarks/>
        public event GetSfBUserPlanCompletedEventHandler GetSfBUserPlanCompleted;
        
        /// <remarks/>
        public event AddSfBUserPlanCompletedEventHandler AddSfBUserPlanCompleted;
        
        /// <remarks/>
        public event UpdateSfBUserPlanCompletedEventHandler UpdateSfBUserPlanCompleted;
        
        /// <remarks/>
        public event DeleteSfBUserPlanCompletedEventHandler DeleteSfBUserPlanCompleted;
        
        /// <remarks/>
        public event SetOrganizationDefaultSfBUserPlanCompletedEventHandler SetOrganizationDefaultSfBUserPlanCompleted;
        
        /// <remarks/>
        public event GetSfBUserGeneralSettingsCompletedEventHandler GetSfBUserGeneralSettingsCompleted;
        
        /// <remarks/>
        public event SetSfBUserGeneralSettingsCompletedEventHandler SetSfBUserGeneralSettingsCompleted;
        
        /// <remarks/>
        public event SetUserSfBPlanCompletedEventHandler SetUserSfBPlanCompleted;
        
        /// <remarks/>
        public event SfBGetFederationDomainsCompletedEventHandler GetFederationDomainsCompleted;
        
        /// <remarks/>
        public event SfBAddFederationDomainCompletedEventHandler AddFederationDomainCompleted;
        
        /// <remarks/>
        public event SfBRemoveFederationDomainCompletedEventHandler RemoveFederationDomainCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateSfBUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBUserResult CreateSfBUser(int itemId, int accountId, int sfbUserPlanId) {
            object[] results = this.Invoke("CreateSfBUser", new object[] {
                        itemId,
                        accountId,
                        sfbUserPlanId});
            return ((SfBUserResult)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginCreateSfBUser(int itemId, int accountId, int sfbUserPlanId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("CreateSfBUser", new object[] {
                        itemId,
                        accountId,
                        sfbUserPlanId}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBUserResult EndCreateSfBUser(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBUserResult)(results[0]));
        }
        
        /// <remarks/>
        public void CreateSfBUserAsync(int itemId, int accountId, int sfbUserPlanId) {
            this.CreateSfBUserAsync(itemId, accountId, sfbUserPlanId, null);
        }
        
        /// <remarks/>
        public void CreateSfBUserAsync(int itemId, int accountId, int sfbUserPlanId, object userState) {
            if ((this.CreateSfBUserOperationCompleted == null)) {
                this.CreateSfBUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateSfBUserOperationCompleted);
            }
            this.InvokeAsync("CreateSfBUser", new object[] {
                        itemId,
                        accountId,
                        sfbUserPlanId}, this.CreateSfBUserOperationCompleted, userState);
        }
        
        private void OnCreateSfBUserOperationCompleted(object arg) {
            if ((this.CreateSfBUserCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.CreateSfBUserCompleted(this, new CreateSfBUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSfBUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public ResultObject DeleteSfBUser(int itemId, int accountId) {
            object[] results = this.Invoke("DeleteSfBUser", new object[] {
                        itemId,
                        accountId});
            return ((ResultObject)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginDeleteSfBUser(int itemId, int accountId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("DeleteSfBUser", new object[] {
                        itemId,
                        accountId}, callback, asyncState);
        }
        
        /// <remarks/>
        public ResultObject EndDeleteSfBUser(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((ResultObject)(results[0]));
        }
        
        /// <remarks/>
        public void DeleteSfBUserAsync(int itemId, int accountId) {
            this.DeleteSfBUserAsync(itemId, accountId, null);
        }
        
        /// <remarks/>
        public void DeleteSfBUserAsync(int itemId, int accountId, object userState) {
            if ((this.DeleteSfBUserOperationCompleted == null)) {
                this.DeleteSfBUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSfBUserOperationCompleted);
            }
            this.InvokeAsync("DeleteSfBUser", new object[] {
                        itemId,
                        accountId}, this.DeleteSfBUserOperationCompleted, userState);
        }
        
        private void OnDeleteSfBUserOperationCompleted(object arg) {
            if ((this.DeleteSfBUserCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.DeleteSfBUserCompleted(this, new DeleteSfBUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSfBUsersPaged", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBUsersPagedResult GetSfBUsersPaged(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows) {
            object[] results = this.Invoke("GetSfBUsersPaged", new object[] {
                        itemId,
                        sortColumn,
                        sortDirection,
                        startRow,
                        maximumRows});
            return ((SfBUsersPagedResult)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginGetSfBUsersPaged(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("GetSfBUsersPaged", new object[] {
                        itemId,
                        sortColumn,
                        sortDirection,
                        startRow,
                        maximumRows}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBUsersPagedResult EndGetSfBUsersPaged(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBUsersPagedResult)(results[0]));
        }
        
        /// <remarks/>
        public void GetSfBUsersPagedAsync(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows) {
            this.GetSfBUsersPagedAsync(itemId, sortColumn, sortDirection, startRow, maximumRows, null);
        }
        
        /// <remarks/>
        public void GetSfBUsersPagedAsync(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows, object userState) {
            if ((this.GetSfBUsersPagedOperationCompleted == null)) {
                this.GetSfBUsersPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSfBUsersPagedOperationCompleted);
            }
            this.InvokeAsync("GetSfBUsersPaged", new object[] {
                        itemId,
                        sortColumn,
                        sortDirection,
                        startRow,
                        maximumRows}, this.GetSfBUsersPagedOperationCompleted, userState);
        }
        
        private void OnGetSfBUsersPagedOperationCompleted(object arg) {
            if ((this.GetSfBUsersPagedCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetSfBUsersPagedCompleted(this, new GetSfBUsersPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSfBUsersByPlanId", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBUser[] GetSfBUsersByPlanId(int itemId, int planId) {
            object[] results = this.Invoke("GetSfBUsersByPlanId", new object[] {
                        itemId,
                        planId});
            return ((SfBUser[])(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginGetSfBUsersByPlanId(int itemId, int planId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("GetSfBUsersByPlanId", new object[] {
                        itemId,
                        planId}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBUser[] EndGetSfBUsersByPlanId(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBUser[])(results[0]));
        }
        
        /// <remarks/>
        public void GetSfBUsersByPlanIdAsync(int itemId, int planId) {
            this.GetSfBUsersByPlanIdAsync(itemId, planId, null);
        }
        
        /// <remarks/>
        public void GetSfBUsersByPlanIdAsync(int itemId, int planId, object userState) {
            if ((this.GetSfBUsersByPlanIdOperationCompleted == null)) {
                this.GetSfBUsersByPlanIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSfBUsersByPlanIdOperationCompleted);
            }
            this.InvokeAsync("GetSfBUsersByPlanId", new object[] {
                        itemId,
                        planId}, this.GetSfBUsersByPlanIdOperationCompleted, userState);
        }
        
        private void OnGetSfBUsersByPlanIdOperationCompleted(object arg) {
            if ((this.GetSfBUsersByPlanIdCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetSfBUsersByPlanIdCompleted(this, new GetSfBUsersByPlanIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSfBUserCount", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public IntResult GetSfBUserCount(int itemId) {
            object[] results = this.Invoke("GetSfBUserCount", new object[] {
                        itemId});
            return ((IntResult)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginGetSfBUserCount(int itemId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("GetSfBUserCount", new object[] {
                        itemId}, callback, asyncState);
        }
        
        /// <remarks/>
        public IntResult EndGetSfBUserCount(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((IntResult)(results[0]));
        }
        
        /// <remarks/>
        public void GetSfBUserCountAsync(int itemId) {
            this.GetSfBUserCountAsync(itemId, null);
        }
        
        /// <remarks/>
        public void GetSfBUserCountAsync(int itemId, object userState) {
            if ((this.GetSfBUserCountOperationCompleted == null)) {
                this.GetSfBUserCountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSfBUserCountOperationCompleted);
            }
            this.InvokeAsync("GetSfBUserCount", new object[] {
                        itemId}, this.GetSfBUserCountOperationCompleted, userState);
        }
        
        private void OnGetSfBUserCountOperationCompleted(object arg) {
            if ((this.GetSfBUserCountCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetSfBUserCountCompleted(this, new GetSfBUserCountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSfBUserPlans", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBUserPlan[] GetSfBUserPlans(int itemId) {
            object[] results = this.Invoke("GetSfBUserPlans", new object[] {
                        itemId});
            return ((SfBUserPlan[])(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginGetSfBUserPlans(int itemId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("GetSfBUserPlans", new object[] {
                        itemId}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBUserPlan[] EndGetSfBUserPlans(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBUserPlan[])(results[0]));
        }
        
        /// <remarks/>
        public void GetSfBUserPlansAsync(int itemId) {
            this.GetSfBUserPlansAsync(itemId, null);
        }
        
        /// <remarks/>
        public void GetSfBUserPlansAsync(int itemId, object userState) {
            if ((this.GetSfBUserPlansOperationCompleted == null)) {
                this.GetSfBUserPlansOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSfBUserPlansOperationCompleted);
            }
            this.InvokeAsync("GetSfBUserPlans", new object[] {
                        itemId}, this.GetSfBUserPlansOperationCompleted, userState);
        }
        
        private void OnGetSfBUserPlansOperationCompleted(object arg) {
            if ((this.GetSfBUserPlansCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetSfBUserPlansCompleted(this, new GetSfBUserPlansCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSfBUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBUserPlan GetSfBUserPlan(int itemId, int sfbUserPlanId) {
            object[] results = this.Invoke("GetSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlanId});
            return ((SfBUserPlan)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginGetSfBUserPlan(int itemId, int sfbUserPlanId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("GetSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlanId}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBUserPlan EndGetSfBUserPlan(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBUserPlan)(results[0]));
        }
        
        /// <remarks/>
        public void GetSfBUserPlanAsync(int itemId, int sfbUserPlanId) {
            this.GetSfBUserPlanAsync(itemId, sfbUserPlanId, null);
        }
        
        /// <remarks/>
        public void GetSfBUserPlanAsync(int itemId, int sfbUserPlanId, object userState) {
            if ((this.GetSfBUserPlanOperationCompleted == null)) {
                this.GetSfBUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSfBUserPlanOperationCompleted);
            }
            this.InvokeAsync("GetSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlanId}, this.GetSfBUserPlanOperationCompleted, userState);
        }
        
        private void OnGetSfBUserPlanOperationCompleted(object arg) {
            if ((this.GetSfBUserPlanCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetSfBUserPlanCompleted(this, new GetSfBUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddSfBUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public int AddSfBUserPlan(int itemId, SfBUserPlan sfbUserPlan) {
            object[] results = this.Invoke("AddSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlan});
            return ((int)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginAddSfBUserPlan(int itemId, SfBUserPlan sfbUserPlan, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("AddSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlan}, callback, asyncState);
        }
        
        /// <remarks/>
        public int EndAddSfBUserPlan(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((int)(results[0]));
        }
        
        /// <remarks/>
        public void AddSfBUserPlanAsync(int itemId, SfBUserPlan sfbUserPlan) {
            this.AddSfBUserPlanAsync(itemId, sfbUserPlan, null);
        }
        
        /// <remarks/>
        public void AddSfBUserPlanAsync(int itemId, SfBUserPlan sfbUserPlan, object userState) {
            if ((this.AddSfBUserPlanOperationCompleted == null)) {
                this.AddSfBUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSfBUserPlanOperationCompleted);
            }
            this.InvokeAsync("AddSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlan}, this.AddSfBUserPlanOperationCompleted, userState);
        }
        
        private void OnAddSfBUserPlanOperationCompleted(object arg) {
            if ((this.AddSfBUserPlanCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.AddSfBUserPlanCompleted(this, new AddSfBUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateSfBUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public int UpdateSfBUserPlan(int itemId, SfBUserPlan sfbUserPlan) {
            object[] results = this.Invoke("UpdateSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlan});
            return ((int)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginUpdateSfBUserPlan(int itemId, SfBUserPlan sfbUserPlan, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("UpdateSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlan}, callback, asyncState);
        }
        
        /// <remarks/>
        public int EndUpdateSfBUserPlan(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((int)(results[0]));
        }
        
        /// <remarks/>
        public void UpdateSfBUserPlanAsync(int itemId, SfBUserPlan sfbUserPlan) {
            this.UpdateSfBUserPlanAsync(itemId, sfbUserPlan, null);
        }
        
        /// <remarks/>
        public void UpdateSfBUserPlanAsync(int itemId, SfBUserPlan sfbUserPlan, object userState) {
            if ((this.UpdateSfBUserPlanOperationCompleted == null)) {
                this.UpdateSfBUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateSfBUserPlanOperationCompleted);
            }
            this.InvokeAsync("UpdateSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlan}, this.UpdateSfBUserPlanOperationCompleted, userState);
        }
        
        private void OnUpdateSfBUserPlanOperationCompleted(object arg) {
            if ((this.UpdateSfBUserPlanCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.UpdateSfBUserPlanCompleted(this, new UpdateSfBUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSfBUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public int DeleteSfBUserPlan(int itemId, int sfbUserPlanId) {
            object[] results = this.Invoke("DeleteSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlanId});
            return ((int)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginDeleteSfBUserPlan(int itemId, int sfbUserPlanId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("DeleteSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlanId}, callback, asyncState);
        }
        
        /// <remarks/>
        public int EndDeleteSfBUserPlan(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((int)(results[0]));
        }
        
        /// <remarks/>
        public void DeleteSfBUserPlanAsync(int itemId, int sfbUserPlanId) {
            this.DeleteSfBUserPlanAsync(itemId, sfbUserPlanId, null);
        }
        
        /// <remarks/>
        public void DeleteSfBUserPlanAsync(int itemId, int sfbUserPlanId, object userState) {
            if ((this.DeleteSfBUserPlanOperationCompleted == null)) {
                this.DeleteSfBUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSfBUserPlanOperationCompleted);
            }
            this.InvokeAsync("DeleteSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlanId}, this.DeleteSfBUserPlanOperationCompleted, userState);
        }
        
        private void OnDeleteSfBUserPlanOperationCompleted(object arg) {
            if ((this.DeleteSfBUserPlanCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.DeleteSfBUserPlanCompleted(this, new DeleteSfBUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetOrganizationDefaultSfBUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public int SetOrganizationDefaultSfBUserPlan(int itemId, int sfbUserPlanId) {
            object[] results = this.Invoke("SetOrganizationDefaultSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlanId});
            return ((int)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginSetOrganizationDefaultSfBUserPlan(int itemId, int sfbUserPlanId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("SetOrganizationDefaultSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlanId}, callback, asyncState);
        }
        
        /// <remarks/>
        public int EndSetOrganizationDefaultSfBUserPlan(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((int)(results[0]));
        }
        
        /// <remarks/>
        public void SetOrganizationDefaultSfBUserPlanAsync(int itemId, int sfbUserPlanId) {
            this.SetOrganizationDefaultSfBUserPlanAsync(itemId, sfbUserPlanId, null);
        }
        
        /// <remarks/>
        public void SetOrganizationDefaultSfBUserPlanAsync(int itemId, int sfbUserPlanId, object userState) {
            if ((this.SetOrganizationDefaultSfBUserPlanOperationCompleted == null)) {
                this.SetOrganizationDefaultSfBUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationDefaultSfBUserPlanOperationCompleted);
            }
            this.InvokeAsync("SetOrganizationDefaultSfBUserPlan", new object[] {
                        itemId,
                        sfbUserPlanId}, this.SetOrganizationDefaultSfBUserPlanOperationCompleted, userState);
        }
        
        private void OnSetOrganizationDefaultSfBUserPlanOperationCompleted(object arg) {
            if ((this.SetOrganizationDefaultSfBUserPlanCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.SetOrganizationDefaultSfBUserPlanCompleted(this, new SetOrganizationDefaultSfBUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSfBUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBUser GetSfBUserGeneralSettings(int itemId, int accountId) {
            object[] results = this.Invoke("GetSfBUserGeneralSettings", new object[] {
                        itemId,
                        accountId});
            return ((SfBUser)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginGetSfBUserGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("GetSfBUserGeneralSettings", new object[] {
                        itemId,
                        accountId}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBUser EndGetSfBUserGeneralSettings(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBUser)(results[0]));
        }
        
        /// <remarks/>
        public void GetSfBUserGeneralSettingsAsync(int itemId, int accountId) {
            this.GetSfBUserGeneralSettingsAsync(itemId, accountId, null);
        }
        
        /// <remarks/>
        public void GetSfBUserGeneralSettingsAsync(int itemId, int accountId, object userState) {
            if ((this.GetSfBUserGeneralSettingsOperationCompleted == null)) {
                this.GetSfBUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSfBUserGeneralSettingsOperationCompleted);
            }
            this.InvokeAsync("GetSfBUserGeneralSettings", new object[] {
                        itemId,
                        accountId}, this.GetSfBUserGeneralSettingsOperationCompleted, userState);
        }
        
        private void OnGetSfBUserGeneralSettingsOperationCompleted(object arg) {
            if ((this.GetSfBUserGeneralSettingsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetSfBUserGeneralSettingsCompleted(this, new GetSfBUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetSfBUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBUserResult SetSfBUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri) {
            object[] results = this.Invoke("SetSfBUserGeneralSettings", new object[] {
                        itemId,
                        accountId,
                        sipAddress,
                        lineUri});
            return ((SfBUserResult)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginSetSfBUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("SetSfBUserGeneralSettings", new object[] {
                        itemId,
                        accountId,
                        sipAddress,
                        lineUri}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBUserResult EndSetSfBUserGeneralSettings(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBUserResult)(results[0]));
        }
        
        /// <remarks/>
        public void SetSfBUserGeneralSettingsAsync(int itemId, int accountId, string sipAddress, string lineUri) {
            this.SetSfBUserGeneralSettingsAsync(itemId, accountId, sipAddress, lineUri, null);
        }
        
        /// <remarks/>
        public void SetSfBUserGeneralSettingsAsync(int itemId, int accountId, string sipAddress, string lineUri, object userState) {
            if ((this.SetSfBUserGeneralSettingsOperationCompleted == null)) {
                this.SetSfBUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetSfBUserGeneralSettingsOperationCompleted);
            }
            this.InvokeAsync("SetSfBUserGeneralSettings", new object[] {
                        itemId,
                        accountId,
                        sipAddress,
                        lineUri}, this.SetSfBUserGeneralSettingsOperationCompleted, userState);
        }
        
        private void OnSetSfBUserGeneralSettingsOperationCompleted(object arg) {
            if ((this.SetSfBUserGeneralSettingsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.SetSfBUserGeneralSettingsCompleted(this, new SetSfBUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserSfBPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBUserResult SetUserSfBPlan(int itemId, int accountId, int sfbUserPlanId) {
            object[] results = this.Invoke("SetUserSfBPlan", new object[] {
                        itemId,
                        accountId,
                        sfbUserPlanId});
            return ((SfBUserResult)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginSetUserSfBPlan(int itemId, int accountId, int sfbUserPlanId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("SetUserSfBPlan", new object[] {
                        itemId,
                        accountId,
                        sfbUserPlanId}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBUserResult EndSetUserSfBPlan(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBUserResult)(results[0]));
        }
        
        /// <remarks/>
        public void SetUserSfBPlanAsync(int itemId, int accountId, int sfbUserPlanId) {
            this.SetUserSfBPlanAsync(itemId, accountId, sfbUserPlanId, null);
        }
        
        /// <remarks/>
        public void SetUserSfBPlanAsync(int itemId, int accountId, int sfbUserPlanId, object userState) {
            if ((this.SetUserSfBPlanOperationCompleted == null)) {
                this.SetUserSfBPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserSfBPlanOperationCompleted);
            }
            this.InvokeAsync("SetUserSfBPlan", new object[] {
                        itemId,
                        accountId,
                        sfbUserPlanId}, this.SetUserSfBPlanOperationCompleted, userState);
        }
        
        private void OnSetUserSfBPlanOperationCompleted(object arg) {
            if ((this.SetUserSfBPlanCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.SetUserSfBPlanCompleted(this, new SetUserSfBPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetFederationDomains", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBFederationDomain[] GetFederationDomains(int itemId) {
            object[] results = this.Invoke("GetFederationDomains", new object[] {
                        itemId});
            return ((SfBFederationDomain[])(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginGetFederationDomains(int itemId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("GetFederationDomains", new object[] {
                        itemId}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBFederationDomain[] EndGetFederationDomains(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBFederationDomain[])(results[0]));
        }
        
        /// <remarks/>
        public void GetFederationDomainsAsync(int itemId) {
            this.GetFederationDomainsAsync(itemId, null);
        }
        
        /// <remarks/>
        public void GetFederationDomainsAsync(int itemId, object userState) {
            if ((this.GetFederationDomainsOperationCompleted == null)) {
                this.GetFederationDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFederationDomainsOperationCompleted);
            }
            this.InvokeAsync("GetFederationDomains", new object[] {
                        itemId}, this.GetFederationDomainsOperationCompleted, userState);
        }
        
        private void OnGetFederationDomainsOperationCompleted(object arg) {
            if ((this.GetFederationDomainsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.GetFederationDomainsCompleted(this, new SfBGetFederationDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddFederationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBUserResult AddFederationDomain(int itemId, string domainName, string proxyFqdn) {
            object[] results = this.Invoke("AddFederationDomain", new object[] {
                        itemId,
                        domainName,
                        proxyFqdn});
            return ((SfBUserResult)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginAddFederationDomain(int itemId, string domainName, string proxyFqdn, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("AddFederationDomain", new object[] {
                        itemId,
                        domainName,
                        proxyFqdn}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBUserResult EndAddFederationDomain(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBUserResult)(results[0]));
        }
        
        /// <remarks/>
        public void AddFederationDomainAsync(int itemId, string domainName, string proxyFqdn) {
            this.AddFederationDomainAsync(itemId, domainName, proxyFqdn, null);
        }
        
        /// <remarks/>
        public void AddFederationDomainAsync(int itemId, string domainName, string proxyFqdn, object userState) {
            if ((this.AddFederationDomainOperationCompleted == null)) {
                this.AddFederationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddFederationDomainOperationCompleted);
            }
            this.InvokeAsync("AddFederationDomain", new object[] {
                        itemId,
                        domainName,
                        proxyFqdn}, this.AddFederationDomainOperationCompleted, userState);
        }
        
        private void OnAddFederationDomainOperationCompleted(object arg) {
            if ((this.AddFederationDomainCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.AddFederationDomainCompleted(this, new SfBAddFederationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/RemoveFederationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public SfBUserResult RemoveFederationDomain(int itemId, string domainName) {
            object[] results = this.Invoke("RemoveFederationDomain", new object[] {
                        itemId,
                        domainName});
            return ((SfBUserResult)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginRemoveFederationDomain(int itemId, string domainName, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("RemoveFederationDomain", new object[] {
                        itemId,
                        domainName}, callback, asyncState);
        }
        
        /// <remarks/>
        public SfBUserResult EndRemoveFederationDomain(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((SfBUserResult)(results[0]));
        }
        
        /// <remarks/>
        public void RemoveFederationDomainAsync(int itemId, string domainName) {
            this.RemoveFederationDomainAsync(itemId, domainName, null);
        }
        
        /// <remarks/>
        public void RemoveFederationDomainAsync(int itemId, string domainName, object userState) {
            if ((this.RemoveFederationDomainOperationCompleted == null)) {
                this.RemoveFederationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveFederationDomainOperationCompleted);
            }
            this.InvokeAsync("RemoveFederationDomain", new object[] {
                        itemId,
                        domainName}, this.RemoveFederationDomainOperationCompleted, userState);
        }
        
        private void OnRemoveFederationDomainOperationCompleted(object arg) {
            if ((this.RemoveFederationDomainCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.RemoveFederationDomainCompleted(this, new SfBRemoveFederationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }

        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetPolicyList", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string[] GetPolicyList(int itemId, SfBPolicyType type, string name)
        {
            object[] results = this.Invoke("GetPolicyList", new object[] {
                        itemId, type, name});
            return ((string[])(results[0]));
        }
        
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void CreateSfBUserCompletedEventHandler(object sender, CreateSfBUserCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class CreateSfBUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal CreateSfBUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBUserResult Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBUserResult)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void DeleteSfBUserCompletedEventHandler(object sender, DeleteSfBUserCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class DeleteSfBUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal DeleteSfBUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public ResultObject Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((ResultObject)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void GetSfBUsersPagedCompletedEventHandler(object sender, GetSfBUsersPagedCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetSfBUsersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetSfBUsersPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBUsersPagedResult Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBUsersPagedResult)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void GetSfBUsersByPlanIdCompletedEventHandler(object sender, GetSfBUsersByPlanIdCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetSfBUsersByPlanIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetSfBUsersByPlanIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBUser[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBUser[])(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void GetSfBUserCountCompletedEventHandler(object sender, GetSfBUserCountCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetSfBUserCountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetSfBUserCountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public IntResult Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((IntResult)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void GetSfBUserPlansCompletedEventHandler(object sender, GetSfBUserPlansCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetSfBUserPlansCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetSfBUserPlansCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBUserPlan[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBUserPlan[])(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void GetSfBUserPlanCompletedEventHandler(object sender, GetSfBUserPlanCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetSfBUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetSfBUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBUserPlan Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBUserPlan)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void AddSfBUserPlanCompletedEventHandler(object sender, AddSfBUserPlanCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class AddSfBUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal AddSfBUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public int Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((int)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void UpdateSfBUserPlanCompletedEventHandler(object sender, UpdateSfBUserPlanCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class UpdateSfBUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal UpdateSfBUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public int Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((int)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void DeleteSfBUserPlanCompletedEventHandler(object sender, DeleteSfBUserPlanCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class DeleteSfBUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal DeleteSfBUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public int Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((int)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void SetOrganizationDefaultSfBUserPlanCompletedEventHandler(object sender, SetOrganizationDefaultSfBUserPlanCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class SetOrganizationDefaultSfBUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal SetOrganizationDefaultSfBUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public int Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((int)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void GetSfBUserGeneralSettingsCompletedEventHandler(object sender, GetSfBUserGeneralSettingsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class GetSfBUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal GetSfBUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBUser Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBUser)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void SetSfBUserGeneralSettingsCompletedEventHandler(object sender, SetSfBUserGeneralSettingsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class SetSfBUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal SetSfBUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBUserResult Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBUserResult)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void SetUserSfBPlanCompletedEventHandler(object sender, SetUserSfBPlanCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class SetUserSfBPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal SetUserSfBPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBUserResult Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBUserResult)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void SfBGetFederationDomainsCompletedEventHandler(object sender, SfBGetFederationDomainsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class SfBGetFederationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal SfBGetFederationDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBFederationDomain[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBFederationDomain[])(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void SfBAddFederationDomainCompletedEventHandler(object sender, SfBAddFederationDomainCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class SfBAddFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal SfBAddFederationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBUserResult Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBUserResult)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    public delegate void SfBRemoveFederationDomainCompletedEventHandler(object sender, SfBRemoveFederationDomainCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class SfBRemoveFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal SfBRemoveFederationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public SfBUserResult Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((SfBUserResult)(this.results[0]));
            }
        }
    }
}
